/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package orm;

import org.hibernate.Criteria;
import org.orm.PersistentException;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class TarjetaCriteria extends AbstractORMCriteria {
	public final IntegerExpression id;
	public final IntegerExpression codigo;
	
	public TarjetaCriteria(Criteria criteria) {
		super(criteria);
		id = new IntegerExpression("id", this);
		codigo = new IntegerExpression("codigo", this);
	}
	
	public TarjetaCriteria(PersistentSession session) {
		this(session.createCriteria(Tarjeta.class));
	}
	
	public TarjetaCriteria() throws PersistentException {
		this(orm.PinPassPersistentManager.instance().getSession());
	}
	
	public ClienteCriteria createClienteCriteria() {
		return new ClienteCriteria(createCriteria("cliente"));
	}
	
	public CoordenadaCriteria createCoordenadaCriteria() {
		return new CoordenadaCriteria(createCriteria("coordenada"));
	}
	
	public Tarjeta uniqueTarjeta() {
		return (Tarjeta) super.uniqueResult();
	}
	
	public Tarjeta[] listTarjeta() {
		java.util.List list = super.list();
		return (Tarjeta[]) list.toArray(new Tarjeta[list.size()]);
	}
}

